package nl.saxion.security.transfer;



import nl.saxion.security.connection.ClientConnection;


/**
 * Class for setting up connection for Client
 * 
 * @author erik
 *
 */
public class Client extends Transfer{
	
	private String ip;
 	
	/**
	 * 
	 * @param comPort
	 * @param dataPort
	 * @param ip
	 */
	public Client(int comPort, int dataPort, String ip)
	{
		super(comPort, dataPort);
		this.ip = ip;
	}
	

	/**
	 * Create Communication connection
	 * @throws Exception 
	 */
	public void createComConnection() throws Exception
	{
		comCon = new ClientConnection(comPort, ip, 0);
		super.createComConnection();
		 
	}
	
	/**
	 * Create Data connection
	 * @return Data connection 
	 * @throws Exception 
	 */
	public void createDataConnection() throws Exception
	{
		dataCon = new ClientConnection(dataPort, ip, 0);
		super.createDataConnection();
	}
	

}
